export function showLoadingInterceptor(request, loadingStart, loadingFinish, responseError) {
  request.interceptors.request.use(((config) => {
    loadingStart();
    return config;
  }), (error) => Promise.reject(error));

  request.interceptors.response.use((response) => {
    loadingFinish();
    return response;
  }, (error) => {
    responseError();
    return Promise.reject(error);
  });
}
